package com.wisdudu.blank.ui.common;

import com.wisdudu.blank.support.rxbus.RxBusFlag;
import com.wisdudu.frame.base.BaseFragment;
import com.wisdudu.frame.base.BaseFragmentActivity;

/**
 * Created by qyf on 2016/7/11.
 * 选择照片页面，通过startActivityForResult进入，传入参数有：
 * MAX_SELECTED_IMG,选择图片最大张数
 * ENABLE_SYSTEM_IMG,是否支持系统图库，默认不支持，false
 */
public class SelectImageActivity extends BaseFragmentActivity {
    @Override
    protected BaseFragment getRootFragment() {
        SelectImageFragment fragment = SelectImageFragment.newInstance(getIntent().getIntExtra(RxBusFlag.MAX_SELECTED_IMG, 1), getIntent().getBooleanExtra(RxBusFlag.ENABLE_SYSTEM_IMG, false));
        return fragment;
    }

    @Override
    public void onBackPressed() {
        removeFragment();
    }
}
